package com.yonyou.brigade.ybz.model;

import java.util.Date;

import com.baomidou.mybatisplus.activerecord.Model;
import com.baomidou.mybatisplus.annotations.TableName;

import java.io.Serializable;

/**
 * 属性实体
 *
 * @author kangfw5@yonyou.com
 * @since 2018-08-14
 */
@TableName("cnv_attribute")
public class CnvAttribute extends Model<CnvAttribute> {

    private static final long serialVersionUID = 1L;

    private String id;
    /**
     * 组合方式
     */
    private Integer assemblyType;
    /**
     * 列名
     */
    private String columnName;
    /**
     * 数据类型
     */
    private Integer dataType;
    /**
     * 数据类型信息
     */
    private String dataTypeInfo;
    /**
     * 默认值
     */
    private String defaultvalue;
    /**
     * 显示名称
     */
    private String displayName;
    /**
     * 是否隐藏
     */
    private Boolean hidden;
    /**
     * 是否扩展字段
     */
    private Boolean isExtend;
    /**
     * 是否需要持久化
     */
    private Boolean isSyncDB;
    /**
     * 最大长度
     */
    private Integer maxLength;
    /**
     * 允许为空
     */
    private Boolean nullable;
    /**
     * 精度
     */
    private Integer numberDigit;
    /**
     * 属性标识
     */
    private String propertyName;
    /**
     * 关联实体
     */
    private String refEntity;
    /**
     * 关联实体编码
     */
    private String refEntityCode;
    /**
     * 表名
     */
    private String tableName;
    /**
     * 所在实体编码
     */
    private String ownerEntity;
    private String enumCode;
    private Integer rowno;
    private Boolean unionKey;
    private Date ts;


    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public Integer getAssemblyType() {
        return assemblyType;
    }

    public void setAssemblyType(Integer assemblyType) {
        this.assemblyType = assemblyType;
    }

    public String getColumnName() {
        return columnName;
    }

    public void setColumnName(String columnName) {
        this.columnName = columnName;
    }

    public Integer getDataType() {
        return dataType;
    }

    public void setDataType(Integer dataType) {
        this.dataType = dataType;
    }

    public String getDataTypeInfo() {
        return dataTypeInfo;
    }

    public void setDataTypeInfo(String dataTypeInfo) {
        this.dataTypeInfo = dataTypeInfo;
    }

    public String getDefaultvalue() {
        return defaultvalue;
    }

    public void setDefaultvalue(String defaultvalue) {
        this.defaultvalue = defaultvalue;
    }

    public String getDisplayName() {
        return displayName;
    }

    public void setDisplayName(String displayName) {
        this.displayName = displayName;
    }

    public Boolean getHidden() {
        return hidden;
    }

    public void setHidden(Boolean hidden) {
        this.hidden = hidden;
    }

    public Boolean getIsExtend() {
        return isExtend;
    }

    public void setIsExtend(Boolean isExtend) {
        this.isExtend = isExtend;
    }

    public Boolean getIsSyncDB() {
        return isSyncDB;
    }

    public void setIsSyncDB(Boolean isSyncDB) {
        this.isSyncDB = isSyncDB;
    }

    public Integer getMaxLength() {
        return maxLength;
    }

    public void setMaxLength(Integer maxLength) {
        this.maxLength = maxLength;
    }

    public Boolean getNullable() {
        return nullable;
    }

    public void setNullable(Boolean nullable) {
        this.nullable = nullable;
    }

    public Integer getNumberDigit() {
        return numberDigit;
    }

    public void setNumberDigit(Integer numberDigit) {
        this.numberDigit = numberDigit;
    }

    public String getPropertyName() {
        return propertyName;
    }

    public void setPropertyName(String propertyName) {
        this.propertyName = propertyName;
    }

    public String getRefEntity() {
        return refEntity;
    }

    public void setRefEntity(String refEntity) {
        this.refEntity = refEntity;
    }

    public String getRefEntityCode() {
        return refEntityCode;
    }

    public void setRefEntityCode(String refEntityCode) {
        this.refEntityCode = refEntityCode;
    }

    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }

    public String getOwnerEntity() {
        return ownerEntity;
    }

    public void setOwnerEntity(String ownerEntity) {
        this.ownerEntity = ownerEntity;
    }

    public String getEnumCode() {
        return enumCode;
    }

    public void setEnumCode(String enumCode) {
        this.enumCode = enumCode;
    }

    public Integer getRowno() {
        return rowno;
    }

    public void setRowno(Integer rowno) {
        this.rowno = rowno;
    }

    public Boolean getUnionKey() {
        return unionKey;
    }

    public void setUnionKey(Boolean unionKey) {
        this.unionKey = unionKey;
    }

    public Date getTs() {
        return ts;
    }

    public void setTs(Date ts) {
        this.ts = ts;
    }

    public static final String ID = "id";

    public static final String ASSEMBLYTYPE = "assemblyType";

    public static final String COLUMNNAME = "columnName";

    public static final String DATATYPE = "dataType";

    public static final String DATATYPEINFO = "dataTypeInfo";

    public static final String DEFAULTVALUE = "defaultvalue";

    public static final String DISPLAYNAME = "displayName";

    public static final String HIDDEN = "hidden";

    public static final String ISEXTEND = "isExtend";

    public static final String ISSYNCDB = "isSyncDB";

    public static final String MAXLENGTH = "maxLength";

    public static final String NULLABLE = "nullable";

    public static final String NUMBERDIGIT = "numberDigit";

    public static final String PROPERTYNAME = "propertyName";

    public static final String REFENTITY = "refEntity";

    public static final String REFENTITYCODE = "refEntityCode";

    public static final String TABLENAME = "tableName";

    public static final String OWNERENTITY = "ownerEntity";

    public static final String ENUMCODE = "enumCode";

    public static final String ROWNO = "rowno";

    public static final String UNIONKEY = "unionKey";

    public static final String TS = "ts";

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "CnvAttribute{" +
                "id=" + id +
                ", assemblyType=" + assemblyType +
                ", columnName=" + columnName +
                ", dataType=" + dataType +
                ", dataTypeInfo=" + dataTypeInfo +
                ", defaultvalue=" + defaultvalue +
                ", displayName=" + displayName +
                ", hidden=" + hidden +
                ", isExtend=" + isExtend +
                ", isSyncDB=" + isSyncDB +
                ", maxLength=" + maxLength +
                ", nullable=" + nullable +
                ", numberDigit=" + numberDigit +
                ", propertyName=" + propertyName +
                ", refEntity=" + refEntity +
                ", refEntityCode=" + refEntityCode +
                ", tableName=" + tableName +
                ", ownerEntity=" + ownerEntity +
                ", enumCode=" + enumCode +
                ", rowno=" + rowno +
                ", unionKey=" + unionKey +
                ", ts=" + ts +
                "}";
    }
}
